<template>
  <div class="bg">
    <div class="box">
      <div class="nav"></div>
      <div class="header" v-for="(item, index) in list" :key="index">
        <div class="title">{{ item.title }}</div>
        <div class="source">{{ item.source }}</div>
        <div class="list">
          <div class="look">阅读量: {{ item.lookNum }}</div>
          <div class="good">点赞量: {{ item.goodNum }}</div>
        </div>
        <div class="conten">
          {{ item.content }}
        </div>
      </div>
    </div>
  </div>
</template>
<script>
import { noticedetaileApi } from "@/service/api.js";
export default {
  name: "index",
  data() {
    return {
      token:"eyJhbGciOiJIUzI1NiJ9.eyJob3NwaWQiOiI0MDI4ODI2ODc2MDIzODQxMDE3NjAyNjdlZWJjMDA5MiIsImFwcGlkIjoiTVAxSTZLUlJwTGJEczhFRWtpVEFkc1ZqSktjNzJiSUkiLCJob3NwbmFtZSI6IumDkeW3nuW4guS6uuawkeWMu-mZoiIsImV4cCI6MTYwNzM5NTA4MCwiaWF0IjoxNjA3MzA4NjgwLCJqdGkiOiJkYTM0OGVlMS01MmNiLTQyNDItYThmYy0zNDg0MjA2MTQxOTMifQ.aU80IUhAJHx4lpdBneOW5z_gY37mnQF2lSE7bcQ1qj0",
      id:"402882687622f935017622fb28a5000c",
      list: [
        {
          title: "我院糖尿病足疗专科应邀参加平顶山第五届糖尿病足论坛",
          source: "河南省预约挂号服务平台",
          lookNum: "499",
          goodNum: "33",
          content:
            "11月20日中原第五届糖尿病足与创面高峰讨论坛在平顶山隆重展开,我院糖尿病足病专科受邀出席,同事,我院赵华斌",
        },
      ],
    };
  },
  components: {},
  created() {
    this.getNewInfo();
  },
  methods: {
    // 获取新闻详情
    getNewInfo() {
      noticedetaileApi({
        apptoken:this.token,
        id:this.id
      }).then(res=>{
        console.log("新闻详情",res);
      })
    },
  },
};
</script>
<style lang="scss" scoped>
.van-notice-bar{
  padding: 0 !important;
}
.bg {
  .box {
    .nav {
      height: 44px;
    }
    .header {
      margin-left: 10px;
      margin-right: 10px;
      .title {
        font-size: 17px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #333333;
        margin-bottom: 10px;
      }
      .source {
        font-size: 12px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #07c6b4;
        margin-bottom: 10px;
      }
      .list {
        display: flex;
        justify-content: space-between;
        font-size: 12px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #999999;
        margin-bottom: 30px;
      }
      .conten {
        font-size: 17px;
        font-family: PingFang SC;
        font-weight: 500;
        color: #000000;
      }
    }
  }
}
</style>
